import Vue from 'vue'
import Vuex from 'vuex'
// vuex缓存处理
import createPersistedState from 'vuex-persistedstate'

import user from './modules/user'
import article from "./modules/article";
import loading from "./modules/loading";

Vue.use(Vuex)

const store = new Vuex.Store({
    modules: {
        user,
        article,
        loading,
    },
    // 缓存处理
    plugins: [ createPersistedState() ]
})

export default store
